-- GENERATED SPELL FOR [Scholomance Necrolyte] --


function spell0_10476(pUnit, Event) --@Shadow Barrier,n/a--
pUnit:FullCastSpellOnTarget(17151,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10476', 570, 1)
end

function spell1_10476(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10476', 3000, 1)
end

function spell2_10476(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(17234,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10476', 591, 1)
end

function Sorts_10476(pUnit, Event)
local choix_sorts_10476 = math.random(0, 2)
if choix_sorts_10476 == 0 then
pUnit:RegisterEvent('spell0_10476', 1, 1)
end
if choix_sorts_10476 == 1 then
pUnit:RegisterEvent('spell1_10476', 1, 1)
end
if choix_sorts_10476 == 2 then
pUnit:RegisterEvent('spell2_10476', 1, 1)
end
end

function mob10476_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10476', math.random(1500, 3000), 1)
end

function mob10476_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10476_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10476_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10476, 1, 'mob10476_Action')
RegisterUnitEvent(10476, 2, 'mob10476_Leave')
RegisterUnitEvent(10476, 3, 'mob10476_Kill')
RegisterUnitEvent(10476, 4, 'mob10476_Die')
